-----------------------------------------------------------------
      name:  <unnamed>
       log:  H:\Research Project 3\Dong-Sibo\Aid_Trade\replicatio
> n\code\replication package [public]\\result\log_file_online.log
  log type:  text
 opened on:  24 Feb 2025, 14:05:33

. 
. *** TA1
. ** TA1A
. use "Sample_ctry_year.dta",clear

. codebook ctry_id // 147

-----------------------------------------------------------------
ctry_id                                    group(recipient_iso2d)
-----------------------------------------------------------------

                  Type: Numeric (float)

                 Range: [2,220]                       Units: 1
         Unique values: 147                       Missing .: 0/1,
> 985

                  Mean: 103.354
             Std. dev.: 60.9084

           Percentiles:     10%       25%       50%       75%    
>    90%
                             21        50        98       153    
>    190

. eststo clear

. estpost sum ln_trade ln_export ln_import tr2 GDP_g ln_GDP_pc EX
> P_ratio IMP_ratio polity2 FDI_NIF,detail

             |  e(count)   e(sum_w)    e(mean)     e(Var) 
-------------+--------------------------------------------
    ln_trade |      1985       1985   21.06481   5.607544 
   ln_export |      1985       1985   20.51043   5.381492 
   ln_import |      1985       1985   19.20748   14.50563 
         tr2 |      1985       1985   .5123426   .2499736 
       GDP_g |      1985       1985   4.004541   27.61099 
   ln_GDP_pc |      1985       1985     8.5474   2.299463 
   EXP_ratio |      1985       1985   42.31748     715.87 
   IMP_ratio |      1985       1985    45.6959    629.891 
     polity2 |      1985       1985    4.73199   34.69527 
     FDI_NIF |      1985       1985    5.06424   113.3403 

             |     e(sd)  e(skewn~)  e(kurto~)     e(sum) 
-------------+--------------------------------------------
    ln_trade |  2.368025  -.1432011   2.659466   41813.64 
   ln_export |  2.319804  -.2011087   2.793476    40713.2 
   ln_import |  3.808625   -1.64821   8.807768   38126.84 
         tr2 |  .4999736  -.0493853   1.002439       1017 
       GDP_g |  5.254616   5.620262   142.1036   7949.013 
   ln_GDP_pc |  1.516398  -.0010377   2.017656   16966.59 
   EXP_ratio |  26.75575   2.767607   15.94439    84000.2 
   IMP_ratio |  25.09763   2.477586   13.96388   90706.37 
     polity2 |  5.890269  -1.046751    2.72574       9393 
     FDI_NIF |  10.64614    11.2555   215.6646   10052.52 

             |    e(min)     e(max)      e(p1)      e(p5) 
-------------+--------------------------------------------
    ln_trade |  14.00114   27.03336   15.57231   17.03377 
   ln_export |  12.21151   26.69773   14.89569   16.46109 
   ln_import |         0   25.99408   .6931472   13.64318 
         tr2 |         0          1          0          0 
       GDP_g | -36.69995   123.1396  -8.855647   -2.77553 
   ln_GDP_pc |  5.390697   11.62597   5.712235   6.124102 
   EXP_ratio |  5.179202   231.1945   9.243405   13.53054 
   IMP_ratio |  9.195168    236.391    12.9596   18.46302 
     polity2 |       -10         10        -10         -7 
     FDI_NIF | -58.32288   252.3081  -4.019628   .0222308 

             |    e(p10)     e(p25)     e(p50)     e(p75) 
-------------+--------------------------------------------
    ln_trade |  18.00975   19.39792   21.09543   22.78206 
   ln_export |  17.49682   18.94649    20.6266   22.10121 
   ln_import |  15.21608    17.3278   19.41344   21.87514 
         tr2 |         0          0          1          1 
       GDP_g | -.3525194   1.933106          4   6.112343 
   ln_GDP_pc |  6.441935   7.295576    8.51292    9.75844 
   EXP_ratio |  17.79944   25.56703   36.89055   52.54337 
   IMP_ratio |   22.9079   29.36338   39.69942   57.51344 
     polity2 |        -6          1          7          9 
     FDI_NIF |   .379465   1.318832   2.999291   5.899089 

             |    e(p90)     e(p95)     e(p99) 
-------------+---------------------------------
    ln_trade |  24.17379   24.85981   26.18715 
   ln_export |  23.47887   24.19979   25.30688 
   ln_import |  23.42622   24.10276   25.37284 
         tr2 |         1          1          1 
       GDP_g |  8.354553   9.979269   16.66543 
   ln_GDP_pc |  10.70683    10.8387   11.39069 
   EXP_ratio |  70.33669   82.83714    182.888 
   IMP_ratio |  72.09743   84.25716   167.9804 
     polity2 |        10         10         10 
     FDI_NIF |  10.07492   15.12742   38.77105 

. esttab using "$repfolder\result\TA1A.csv", replace label cells(
> "count mean(fmt(3))  p50(fmt(3)) sd(fmt(3))" ) noobs
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\TA1A.csv not found)
(output written to H:\Research Project 3\Dong-Sibo\Aid_Trade\repl
> ication\code\replication package [public]\result\TA1A.csv)

. 
. ** TA1B
. use "Sample_ctry_ind_year.dta",clear

. eststo clear

. estpost sum ln_export tr2 RCA_sitc3_china RCA_sitc2_china,detai
> l

             |  e(count)   e(sum_w)    e(mean)     e(Var) 
-------------+--------------------------------------------
   ln_export |    363961     363961   13.01239   18.15161 
         tr2 |    363961     363961   .4991661        .25 
RCA_sitc3_~a |    363961     363961    1.22662   1.645684 
RCA_sitc2_~a |    363961     363961   1.109273   1.100641 

             |     e(sd)  e(skewn~)  e(kurto~)     e(sum) 
-------------+--------------------------------------------
   ln_export |  4.260471  -1.075402   4.572614    4736001 
         tr2 |        .5   .0033355   1.000011     181677 
RCA_sitc3_~a |  1.282842   1.796172   7.376676   446441.9 
RCA_sitc2_~a |  1.049115   1.613339   6.476139   403732.1 

             |    e(min)     e(max)      e(p1)      e(p5) 
-------------+--------------------------------------------
   ln_export |         0   24.67652          0   4.779123 
         tr2 |         0          1          0          0 
RCA_sitc3_~a |         0   11.20079   .0073074   .0409834 
RCA_sitc2_~a |  4.63e-06   8.434092   .0220138   .0870035 

             |    e(p10)     e(p25)     e(p50)     e(p75) 
-------------+--------------------------------------------
   ln_export |  7.912057   10.97408   13.64786   15.87458 
         tr2 |         0          0          0          1 
RCA_sitc3_~a |  .1061649   .2935981   .7808123   1.745021 
RCA_sitc2_~a |  .1634477   .3460009   .7358911   1.600825 

             |    e(p90)     e(p95)     e(p99) 
-------------+---------------------------------
   ln_export |  17.67759   18.65691   20.35964 
         tr2 |         1          1          1 
RCA_sitc3_~a |  3.151267   3.712789   5.643229 
RCA_sitc2_~a |  2.817794   3.277586   3.968447 

. esttab using "$repfolder\result\TA1B.csv", replace label cells(
> "count mean(fmt(3))  p50(fmt(3)) sd(fmt(3))" ) noobs
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\TA1B.csv not found)
(output written to H:\Research Project 3\Dong-Sibo\Aid_Trade\repl
> ication\code\replication package [public]\result\TA1B.csv)

. 
. ** TA1C
. use "Sample_firm_ctry_year.dta",clear

. eststo clear

. estpost sum ln_export_value tr2 soex LNTA LEV ROA ROE_lag lnemp
> _lag lnempat_lag,detail

             |  e(count)   e(sum_w)    e(mean)     e(Var) 
-------------+--------------------------------------------
ln_export_~e |   5012185    5012185   11.00061   4.816959 
         tr2 |   5012185    5012185   .3551254   .2290114 
        soex |   5012185    5012185   .0706973   .0656992 
        LNTA |   5012185    5012185   10.96057   2.439688 
         LEV |   5012185    5012185    .576438   .0674489 
         ROA |   5012185    5012185   .0823661   .0231824 
     ROE_lag |   4172595    4172595   .2154581   .2167366 
   lnemp_lag |   4242180    4242180   5.653788   1.352614 
 lnempat_lag |   4180798    4180798  -5.277318   1.278797 

             |     e(sd)  e(skewn~)  e(kurto~)     e(sum) 
-------------+--------------------------------------------
ln_export_~e |  2.194757  -.0704617   3.496472   5.51e+07 
         tr2 |  .4785513   .6054717   1.366596    1779954 
        soex |  .2563186   3.349759   12.22089     354348 
        LNTA |   1.56195   .3377416   2.822151   5.49e+07 
         LEV |  .2597093   .1032732   3.411003    2889214 
         ROA |  .1522575   2.756646   13.09546   412833.9 
     ROE_lag |  .4655498   2.990135   17.67115   899019.3 
   lnemp_lag |  1.163019    .238562   3.062044   2.40e+07 
 lnempat_lag |  1.130839  -.3201248     3.0821  -2.21e+07 

             |    e(min)     e(max)      e(p1)      e(p5) 
-------------+--------------------------------------------
ln_export_~e |  .6931472   53.28701   5.517453   7.414573 
         tr2 |         0          1          0          0 
        soex |         0          1          0          0 
        LNTA |  6.030685   14.67432   7.800982   8.634087 
         LEV |         0   1.662278   .0261974   .1254887 
         ROA | -.1839797   .8756642  -.1839797  -.0552514 
     ROE_lag |  -1.03117   2.939904   -1.03117       -.16 
   lnemp_lag |  2.890372   8.764053   2.890372   3.806663 
 lnempat_lag | -8.526664  -2.764811  -8.526664  -7.249262 

             |    e(p10)     e(p25)     e(p50)     e(p75) 
-------------+--------------------------------------------
ln_export_~e |  8.309184   9.618602     10.963   12.41768 
         tr2 |         0          0          0          1 
        soex |         0          0          0          0 
        LNTA |  9.067509   9.845911   10.81918   11.94516 
         LEV |  .2158144   .3969536   .5927495   .7613128 
         ROA | -.0192577   .0071714   .0397167   .1070664 
     ROE_lag |  -.041471   .0247385   .1141246   .2761948 
   lnemp_lag |  4.219508   4.882802   5.616771   6.359574 
 lnempat_lag | -6.746207  -5.988647  -5.218807  -4.498814 

             |    e(p90)     e(p95)     e(p99) 
-------------+---------------------------------
ln_export_~e |  13.81494   14.64295   16.13465 
         tr2 |         1          1          1 
        soex |         0          1          1 
        LNTA |  13.11881   13.90952   14.67432 
         LEV |  .8854473   .9480718   1.183937 
         ROA |  .2276906   .3610555   .8756642 
     ROE_lag |  .5651489   .9236881   2.939904 
   lnemp_lag |  7.191429   7.736307   8.764053 
 lnempat_lag | -3.876542  -3.497841  -2.764811 

. esttab using "$repfolder\result\TA1C.csv", replace label cells(
> "count mean(fmt(3))  p50(fmt(3)) sd(fmt(3))" ) noobs
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\TA1C.csv not found)
(output written to H:\Research Project 3\Dong-Sibo\Aid_Trade\repl
> ication\code\replication package [public]\result\TA1C.csv)

. 
. ** TA1D
. use "Sample_price.dta",clear

. eststo clear

. estpost sum ln_price tr2 soex,detail

             |  e(count)   e(sum_w)    e(mean)     e(Var) 
-------------+--------------------------------------------
    ln_price |  1.18e+07   1.18e+07   1.997019   4.877254 
         tr2 |  1.18e+07   1.18e+07   .3107011   .2141659 
        soex |  1.18e+07   1.18e+07   .0814446   .0748114 

             |     e(sd)  e(skewn~)  e(kurto~)     e(sum) 
-------------+--------------------------------------------
    ln_price |  2.208451   1.265448   6.364601   2.36e+07 
         tr2 |  .4627806   .8180936   1.669277    3668713 
        soex |  .2735167   3.060548   10.36695     961686 

             |    e(min)     e(max)      e(p1)      e(p5) 
-------------+--------------------------------------------
    ln_price | -12.69748   20.10395  -2.426301  -.7948291 
         tr2 |         0          1          0          0 
        soex |         0          1          0          0 

             |    e(p10)     e(p25)     e(p50)     e(p75) 
-------------+--------------------------------------------
    ln_price | -.1823216   .6731637   1.634799   2.883081 
         tr2 |         0          0          0          1 
        soex |         0          0          0          0 

             |    e(p90)     e(p95)     e(p99) 
-------------+---------------------------------
    ln_price |  4.659731   6.173786   9.833012 
         tr2 |         1          1          1 
        soex |         0          1          1 

. esttab using "$repfolder\result\TA1D.csv", replace label cells(
> "count mean(fmt(3))  p50(fmt(3)) sd(fmt(3))" ) noobs
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\TA1D.csv not found)
(output written to H:\Research Project 3\Dong-Sibo\Aid_Trade\repl
> ication\code\replication package [public]\result\TA1D.csv)

. 
. *** TA2
. use "Sample_ctry_year.dta",clear

. 
. reghdfe ln_export tr2_Grant tr2_Loan tr2_Tech tr2_Other,  abs(c
> try_id year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)
note: tr2_Tech is probably collinear with the fixed effects (all 
> partialled-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   3,    146)
>  =      11.29
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9747
                                                  Adj R-squared  
>  =     0.9725
                                                  Within R-sq.   
>  =     0.0672
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3850

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
   tr2_Grant |   .5405062   .1020844     5.29   0.000      .33875
> 2                                                              
>      .7422603
    tr2_Loan |   .2516902   .0978165     2.57   0.011     .058370
> 9                                                              
>      .4450095
    tr2_Tech |          0  (omitted)
   tr2_Other |    .127728   .1487739     0.86   0.392    -.166300
> 8                                                              
>      .4217567
       _cons |   20.31632   .0341549   594.83   0.000     20.2488
> 2                                                              
>      20.38382
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA2.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA2.xls
dir : seeout

. reghdfe ln_export tr2_Grant tr2_Loan tr2_Tech tr2_Other $ctrl0,
>   abs(ctry_id year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)
note: tr2_Tech is probably collinear with the fixed effects (all 
> partialled-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   9,    146)
>  =      15.29
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9787
                                                  Adj R-squared  
>  =     0.9767
                                                  Within R-sq.   
>  =     0.2129
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3543

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
   tr2_Grant |    .402044   .0866366     4.64   0.000     .230820
> 2                                                              
>      .5732679
    tr2_Loan |    .265732   .0877968     3.03   0.003     .092215
> 2                                                              
>      .4392488
    tr2_Tech |          0  (omitted)
   tr2_Other |   .1227429    .136299     0.90   0.369     -.14663
> 1                                                              
>      .3921168
       GDP_g |   .0022781   .0029756     0.77   0.445    -.003602
> 8                                                              
>       .008159
   ln_GDP_pc |   1.392965   .2339826     5.95   0.000      .93053
> 4                                                              
>      1.855395
   EXP_ratio |  -.0041475   .0027401    -1.51   0.132    -.009562
> 9                                                              
>      .0012678
   IMP_ratio |   .0087869   .0031057     2.83   0.005      .00264
> 9                                                              
>      .0149248
     polity2 |   .0213422   .0118449     1.80   0.074    -.002067
> 4                                                              
>      .0447517
     FDI_NIF |   .0032041   .0026995     1.19   0.237    -.002131
> 1                                                              
>      .0085392
       _cons |   8.094846   2.013461     4.02   0.000     4.11555
> 1                                                              
>      12.07414
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA2.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA2.xls
dir : seeout

. 
. reghdfe ln_export tr2_ODA tr2_OTHER,  abs(ctry_id year) cluster
> (ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   2,    146)
>  =      17.97
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9747
                                                  Adj R-squared  
>  =     0.9724
                                                  Within R-sq.   
>  =     0.0665
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3851

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
     tr2_ODA |   .5098187   .0886694     5.75   0.000     .334577
> 3                                                              
>        .68506
   tr2_OTHER |    .217308   .0950328     2.29   0.024     .029490
> 4                                                              
>      .4051256
       _cons |   20.29285    .036508   555.85   0.000     20.2206
> 9                                                              
>        20.365
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA2.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA2.xls
dir : seeout

. reghdfe ln_export tr2_ODA tr2_OTHER $ctrl0,  abs(ctry_id year) 
> cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   8,    146)
>  =      17.06
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9787
                                                  Adj R-squared  
>  =     0.9767
                                                  Within R-sq.   
>  =     0.2132
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3541

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
     tr2_ODA |   .3975359    .075136     5.29   0.000     .249041
> 3                                                              
>      .5460306
   tr2_OTHER |   .1829504   .0887082     2.06   0.041     .007632
> 3                                                              
>      .3582685
       GDP_g |   .0025882   .0029989     0.86   0.390    -.003338
> 6                                                              
>      .0085149
   ln_GDP_pc |   1.395362   .2348375     5.94   0.000     .931242
> 3                                                              
>      1.859483
   EXP_ratio |  -.0042484    .002763    -1.54   0.126    -.009709
> 1                                                              
>      .0012122
   IMP_ratio |   .0088498   .0030886     2.87   0.005     .002745
> 7                                                              
>      .0149538
     polity2 |    .019069   .0118665     1.61   0.110    -.004383
> 2                                                              
>      .0425212
     FDI_NIF |   .0032221   .0027074     1.19   0.236    -.002128
> 6                                                              
>      .0085727
       _cons |   8.070501   2.019665     4.00   0.000     4.07894
> 4                                                              
>      12.06206
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA2.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA2.xls
dir : seeout

. 
. *** TA3
. use "Sample_ctry_year.dta",clear

. * generalized DiD
. reghdfe ln_export ln_tr2_val_post,  abs(ctry_id year) cluster(c
> try_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   1,    146)
>  =      33.52
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9742
                                                  Adj R-squared  
>  =     0.9720
                                                  Within R-sq.   
>  =     0.0493
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3885

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~t |   .0221043   .0038178     5.79   0.000     .014559
> 1                                                              
>      .0296495
       _cons |    20.3269   .0316984   641.26   0.000     20.2642
> 5                                                              
>      20.38955
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA3.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA3.xls
dir : seeout

. reghdfe ln_export ln_tr2_val_post $ctrl0,  abs(ctry_id year) cl
> uster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   7,    146)
>  =      18.56
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9784
                                                  Adj R-squared  
>  =     0.9764
                                                  Within R-sq.   
>  =     0.2039
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3561

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~t |   .0175687   .0033186     5.29   0.000       .0110
> 1                                                              
>      .0241274
       GDP_g |   .0025083   .0032133     0.78   0.436    -.003842
> 3                                                              
>      .0088589
   ln_GDP_pc |   1.433876   .2396474     5.98   0.000     .960249
> 8                                                              
>      1.907502
   EXP_ratio |  -.0042575   .0027505    -1.55   0.124    -.009693
> 4                                                              
>      .0011784
   IMP_ratio |   .0088739    .002914     3.05   0.003      .00311
> 5                                                              
>      .0146329
     polity2 |   .0198853   .0119317     1.67   0.098    -.003695
> 9                                                              
>      .0434666
     FDI_NIF |   .0032005   .0027121     1.18   0.240    -.002159
> 5                                                              
>      .0085605
       _cons |    7.76296   2.063287     3.76   0.000     3.68519
> 2                                                              
>      11.84073
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA3.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA3.xls
dir : seeout

. 
. * lagged aid value
. reghdfe ln_export ln_tr2_valx,  abs(ctry_id year) cluster(ctry_
> id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   1,    146)
>  =      17.03
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0001
                                                  R-squared      
>  =     0.9733
                                                  Adj R-squared  
>  =     0.9710
                                                  Within R-sq.   
>  =     0.0155
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3953

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
 ln_tr2_valx |   .0081715     .00198     4.13   0.000     .004258
> 4                                                              
>      .0120846
       _cons |   20.46216   .0116955  1749.57   0.000     20.4390
> 5                                                              
>      20.48527
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA3.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA3.xls
dir : seeout

. reghdfe ln_export ln_tr2_valx $ctrl0,  abs(ctry_id year) cluste
> r(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   7,    146)
>  =      17.45
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9779
                                                  Adj R-squared  
>  =     0.9758
                                                  Within R-sq.   
>  =     0.1837
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3606

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
 ln_tr2_valx |   .0066047     .00181     3.65   0.000     .003027
> 5                                                              
>      .0101818
       GDP_g |   .0022431   .0034784     0.64   0.520    -.004631
> 5                                                              
>      .0091177
   ln_GDP_pc |   1.497247   .2454447     6.10   0.000     1.01216
> 3                                                              
>       1.98233
   EXP_ratio |  -.0052311   .0028133    -1.86   0.065    -.010791
> 2                                                              
>       .000329
   IMP_ratio |   .0092832   .0028632     3.24   0.001     .003624
> 4                                                              
>       .014942
     polity2 |   .0200709   .0122919     1.63   0.105    -.004222
> 2                                                              
>       .044364
     FDI_NIF |   .0030655   .0026821     1.14   0.255    -.002235
> 2                                                              
>      .0083662
       _cons |    7.35153   2.110515     3.48   0.001     3.18042
> 3                                                              
>      11.52264
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA3.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA3.xls
dir : seeout

. 
. * Synthetic Difference in Differences (Arkhangelsky et al 2021)
. * Dmitry Arkhangelsky, Susan Athey, David A. Hirshberg, Guido W
> . Imbens, and Stefan Wager. Synthetic Difference in Differences
> , American Economic Review, December 2021.
. use "Sample_ctry_year.dta",clear

. * create balanced panel
. bysort ctry_id: g yrN=_N

. sum yrN

    Variable |        Obs        Mean    Std. dev.       Min     
>    Max
-------------+---------------------------------------------------
> ------
         yrN |      1,985     14.1073    1.972613          1     
>     15

. keep if yrN==15
(485 observations deleted)

. count // 1,500
  1,500

. 
. sdid ln_export ctry_id year tr2, vce(bootstrap) seed(1213)
Bootstrap replications (50). This may take some time.
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
..................................................     50


Synthetic Difference-in-Differences Estimator

-----------------------------------------------------------------
> ------------
   ln_export |     ATT     Std. Err.     t      P>|t|    [95% Con
> f. Interval]
-------------+---------------------------------------------------
> ------------
         tr2 |   0.41667    0.10885     3.83    0.000     0.20333
>      0.63001
-----------------------------------------------------------------
> ------------
95% CIs and p-values are based on large-sample approximations.
Refer to Arkhangelsky et al., (2021) for theoretical derivations.

. /*
> ---------------------------------------------------------------
> --------------
>    ln_export |     ATT     Std. Err.     t      P>|t|    [95% C
> onf. Interval]
> -------------+-------------------------------------------------
> --------------
>    treatment |   0.41667    0.10885     3.83    0.000     0.203
> 33     0.63001
> ---------------------------------------------------------------
> --------------
> */
. sdid ln_export ctry_id year tr2, vce(bootstrap) seed(1213) cova
> riates(GDP_g ln_GDP_pc EXP_ratio IMP_ratio polity2 FDI_NIF)
Bootstrap replications (50). This may take some time.
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
..................................................     50


Synthetic Difference-in-Differences Estimator

-----------------------------------------------------------------
> ------------
   ln_export |     ATT     Std. Err.     t      P>|t|    [95% Con
> f. Interval]
-------------+---------------------------------------------------
> ------------
         tr2 |   0.43518    0.11299     3.85    0.000     0.21373
>      0.65662
-----------------------------------------------------------------
> ------------
95% CIs and p-values are based on large-sample approximations.
Refer to Arkhangelsky et al., (2021) for theoretical derivations.

. /*
> ---------------------------------------------------------------
> --------------
>    ln_export |     ATT     Std. Err.     t      P>|t|    [95% C
> onf. Interval]
> -------------+-------------------------------------------------
> --------------
>    treatment |   0.43518    0.11299     3.85    0.000     0.213
> 73     0.65662
> ---------------------------------------------------------------
> --------------
> */
. 
. *** TA4
. use "Sample_ctry_year.dta",clear

. * exclude all countries with first aid year is 2000, 2001, 2002
. reghdfe ln_export tr2 $ctrl0 if tr2_year~=2000 & tr2_year~=2001
>  & tr2_year~=2002,  abs(ctry_id year) cluster(ctry_id) keepsing
>  nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,163
Absorbing 2 HDFE groups                           F(   7,     82)
>  =      15.10
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9824
                                                  Adj R-squared  
>  =     0.9806
                                                  Within R-sq.   
>  =     0.2414
Number of clusters (ctry_id) =         83         Root MSE       
>  =     0.3315

                               (Std. err. adjusted for 83 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |    .425215   .0767847     5.54   0.000     .272465
> 8                                                              
>      .5779641
       GDP_g |   .0016247   .0038318     0.42   0.673     -.00599
> 8                                                              
>      .0092474
   ln_GDP_pc |    1.30036   .2262294     5.75   0.000      .85031
> 8                                                              
>      1.750403
   EXP_ratio |  -.0007982    .003421    -0.23   0.816    -.007603
> 7                                                              
>      .0060073
   IMP_ratio |   .0064661   .0026175     2.47   0.016     .001259
> 1                                                              
>      .0116731
     polity2 |    .014431     .01853     0.78   0.438    -.022431
> 1                                                              
>      .0512931
     FDI_NIF |   .0028781   .0026424     1.09   0.279    -.002378
> 6                                                              
>      .0081347
       _cons |   8.377809   2.129854     3.93   0.000     4.14085
> 2                                                              
>      12.61477
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |        83          83           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA4.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA4.xls
dir : seeout

. * Aid with value in the top 25% percentile
. reghdfe ln_export tr2_top25 $ctrl0,  abs(ctry_id year) cluster(
> ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   7,    146)
>  =      12.88
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9779
                                                  Adj R-squared  
>  =     0.9759
                                                  Within R-sq.   
>  =     0.1848
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3603

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
   tr2_top25 |   .1665608   .0676375     2.46   0.015     .032885
> 8                                                              
>      .3002358
       GDP_g |   .0022995   .0035826     0.64   0.522     -.00478
> 1                                                              
>      .0093799
   ln_GDP_pc |   1.473579   .2486272     5.93   0.000     .982206
> 1                                                              
>      1.964953
   EXP_ratio |  -.0042654    .002975    -1.43   0.154     -.01014
> 5                                                              
>      .0016142
   IMP_ratio |   .0089143   .0026197     3.40   0.001     .003736
> 8                                                              
>      .0140917
     polity2 |   .0193785   .0119505     1.62   0.107    -.004239
> 9                                                              
>      .0429969
     FDI_NIF |   .0031104   .0027122     1.15   0.253    -.002249
> 8                                                              
>      .0084706
       _cons |   7.524327   2.133912     3.53   0.001     3.30697
> 9                                                              
>      11.74167
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA4.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA4.xls
dir : seeout

. * income-cutoff by year FE
. reghdfe ln_export tr2 $ctrl0,  abs(ctry_id income_yr) cluster(c
> try_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,959
Absorbing 2 HDFE groups                           F(   7,    143)
>  =      10.39
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9803
                                                  Adj R-squared  
>  =     0.9779
                                                  Within R-sq.   
>  =     0.1178
Number of clusters (ctry_id) =        144         Root MSE       
>  =     0.3436

                              (Std. err. adjusted for 144 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .2335144   .0646173     3.61   0.000     .105785
> 8                                                              
>      .3612429
       GDP_g |   .0037378   .0025788     1.45   0.149    -.001359
> 8                                                              
>      .0088354
   ln_GDP_pc |   1.114356   .2707957     4.12   0.000     .579076
> 7                                                              
>      1.649636
   EXP_ratio |  -.0024481    .002779    -0.88   0.380    -.007941
> 3                                                              
>      .0030452
   IMP_ratio |    .006827   .0023799     2.87   0.005     .002122
> 6                                                              
>      .0115315
     polity2 |   .0086294   .0122496     0.70   0.482    -.015584
> 2                                                              
>       .032843
     FDI_NIF |   .0030553   .0022597     1.35   0.178    -.001411
> 4                                                              
>       .007522
       _cons |    10.6183   2.321298     4.57   0.000      6.0298
> 1                                                              
>      15.20679
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       144         144           0    *|
   income_yr |        60           1          59     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA4.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA4.xls
dir : seeout

. * country linear trends
. reghdfe ln_export tr2 $ctrl0,  abs(ctry_id#c.year ctry_id year)
>  cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 1090 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 3 HDFE groups                           F(   7,    146)
>  =      11.98
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9890
                                                  Adj R-squared  
>  =     0.9869
                                                  Within R-sq.   
>  =     0.1434
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.2655

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .1084587   .0485462     2.23   0.027     .012514
> 6                                                              
>      .2044028
       GDP_g |   .0025782   .0023352     1.10   0.271    -.002036
> 9                                                              
>      .0071933
   ln_GDP_pc |   1.863796    .314252     5.93   0.000     1.24272
> 5                                                              
>      2.484866
   EXP_ratio |  -.0076167   .0028413    -2.68   0.008    -.013232
> 1                                                              
>     -.0020014
   IMP_ratio |     .00754   .0019791     3.81   0.000     .003628
> 6                                                              
>      .0114513
     polity2 |  -.0041054   .0097298    -0.42   0.674    -.023334
> 9                                                              
>       .015124
     FDI_NIF |   .0020082   .0018792     1.07   0.287    -.001705
> 7                                                              
>      .0057221
       _cons |   4.500959   2.715199     1.66   0.100    -.865212
> 7                                                              
>      9.867131
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
--------------------------------------------------------+
    Absorbed FE | Categories  - Redundant  = Num. Coefs |
----------------+---------------------------------------|
 ctry_id#c.year |       147           0         147    ?|
        ctry_id |       147         147           0    *|
           year |        15           1          14     |
--------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA4.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA4.xls
dir : seeout

. replace export=0 if mi(export)
(0 real changes made)

. g export_IHS=log(export + sqrt(export^2 + 1))

. reghdfe export_IHS tr2 $ctrl0,  abs(ctry_id year) cluster(ctry_
> id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,985
Absorbing 2 HDFE groups                           F(   7,    146)
>  =      18.67
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9785
                                                  Adj R-squared  
>  =     0.9765
                                                  Within R-sq.   
>  =     0.2074
Number of clusters (ctry_id) =        147         Root MSE       
>  =     0.3553

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
  export_IHS | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .3100656   .0588022     5.27   0.000     .193852
> 2                                                              
>       .426279
       GDP_g |   .0024571   .0031528     0.78   0.437     -.00377
> 4                                                              
>      .0086881
   ln_GDP_pc |   1.417271    .238469     5.94   0.000     .945974
> 4                                                              
>      1.888569
   EXP_ratio |  -.0042314   .0027383    -1.55   0.124    -.009643
> 4                                                              
>      .0011805
   IMP_ratio |   .0088951   .0029833     2.98   0.003     .002999
> 2                                                              
>      .0147911
     polity2 |   .0201759    .011995     1.68   0.095    -.003530
> 4                                                              
>      .0438822
     FDI_NIF |   .0032195   .0027172     1.18   0.238    -.002150
> 6                                                              
>      .0085896
       _cons |   8.581705   2.052552     4.18   0.000     4.52515
> 3                                                              
>      12.63826
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       147         147           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA4.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA4.xls
dir : seeout

. 
. *** TA5
. use "Sample_ctry_year.dta",clear

. g tr2_f3yr=(tr2_year~=. & (year-tr2_year)>=1 & (year-tr2_year)<
> =4)

. drop if tr2_year~=. & (year-tr2_year)>3
(794 observations deleted)

. 
. reghdfe ln_trade tr2_f3yr ,  abs(ctry_id year) cluster(ctry_id)
>  keepsing nowarn
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,191
Absorbing 2 HDFE groups                           F(   1,    130)
>  =       9.68
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0023
                                                  R-squared      
>  =     0.9824
                                                  Adj R-squared  
>  =     0.9800
                                                  Within R-sq.   
>  =     0.0179
Number of clusters (ctry_id) =        131         Root MSE       
>  =     0.3549

                              (Std. err. adjusted for 131 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
    ln_trade | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
    tr2_f3yr |   .1735163   .0557608     3.11   0.002     .063200
> 2                                                              
>      .2838324
       _cons |   21.09223   .0104405  2020.23   0.000     21.0715
> 8                                                              
>      21.11289
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       131         131           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA5.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA5.xls
dir : seeout

. reghdfe ln_trade tr2_f3yr $ctrl0,  abs(ctry_id year) cluster(ct
> ry_id) keepsing nowarn
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,191
Absorbing 2 HDFE groups                           F(   7,    130)
>  =       9.97
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9851
                                                  Adj R-squared  
>  =     0.9829
                                                  Within R-sq.   
>  =     0.1660
Number of clusters (ctry_id) =        131         Root MSE       
>  =     0.3280

                              (Std. err. adjusted for 131 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
    ln_trade | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
    tr2_f3yr |   .1281976   .0537749     2.38   0.019     .021810
> 3                                                              
>      .2345848
       GDP_g |   .0049187   .0024362     2.02   0.046     .000098
> 9                                                              
>      .0097385
   ln_GDP_pc |   1.280247   .2904928     4.41   0.000      .70554
> 2                                                              
>      1.854953
   EXP_ratio |   .0112682   .0037723     2.99   0.003     .003805
> 3                                                              
>      .0187312
   IMP_ratio |   .0009052   .0020329     0.45   0.657    -.003116
> 6                                                              
>      .0049271
     polity2 |   .0172797   .0217551     0.79   0.428    -.025760
> 1                                                              
>      .0603194
     FDI_NIF |  -.0000795   .0013137    -0.06   0.952    -.002678
> 5                                                              
>      .0025194
       _cons |   8.781283   2.681369     3.27   0.001     3.47651
> 4                                                              
>      14.08605
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       131         131           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA5.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA5.xls
dir : seeout

. 
. reghdfe ln_export tr2_f3yr,  abs(ctry_id year) cluster(ctry_id)
>  keepsing nowarn
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,191
Absorbing 2 HDFE groups                           F(   1,    130)
>  =      27.34
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9832
                                                  Adj R-squared  
>  =     0.9809
                                                  Within R-sq.   
>  =     0.0479
Number of clusters (ctry_id) =        131         Root MSE       
>  =     0.3438

                              (Std. err. adjusted for 131 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
    tr2_f3yr |   .2790147    .053366     5.23   0.000     .173436
> 5                                                              
>      .3845928
       _cons |   20.48484   .0099921  2050.10   0.000     20.4650
> 7                                                              
>      20.50461
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       131         131           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA5.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA5.xls
dir : seeout

. reghdfe ln_export tr2_f3yr $ctrl0,  abs(ctry_id year) cluster(c
> try_id) keepsing nowarn
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,191
Absorbing 2 HDFE groups                           F(   7,    130)
>  =      20.47
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9860
                                                  Adj R-squared  
>  =     0.9840
                                                  Within R-sq.   
>  =     0.2074
Number of clusters (ctry_id) =        131         Root MSE       
>  =     0.3146

                              (Std. err. adjusted for 131 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
    tr2_f3yr |   .2154139    .051438     4.19   0.000       .1136
> 5                                                              
>      .3171778
       GDP_g |   .0048283   .0021878     2.21   0.029     .000499
> 9                                                              
>      .0091567
   ln_GDP_pc |   1.463942   .3282429     4.46   0.000     .814552
> 7                                                              
>      2.113331
   EXP_ratio |   .0024993   .0036725     0.68   0.497    -.004766
> 3                                                              
>      .0097649
   IMP_ratio |   .0073992   .0020647     3.58   0.000     .003314
> 4                                                              
>      .0114841
     polity2 |   .0070864   .0154906     0.46   0.648    -.023559
> 9                                                              
>      .0377327
     FDI_NIF |   .0004455   .0012434     0.36   0.721    -.002014
> 4                                                              
>      .0029053
       _cons |   6.664564   2.992858     2.23   0.028     .743551
> 9                                                              
>      12.58558
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       131         131           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA5.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA5.xls
dir : seeout

. 
. *** TA6
. ** TA6A
. use "Sample_ctry_year.dta",clear

. drop if Income_Indicator_2000=="H"
(425 observations deleted)

. reghdfe ln_trade tr2 ,  abs(ctry_id year) cluster(ctry_id) keep
> sing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   1,    117)
>  =       5.99
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0159
                                                  R-squared      
>  =     0.9734
                                                  Adj R-squared  
>  =     0.9709
                                                  Within R-sq.   
>  =     0.0138
Number of clusters (ctry_id) =        118         Root MSE       
>  =     0.3859

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
    ln_trade | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .1842829   .0752929     2.45   0.016     .035169
> 2                                                              
>      .3333965
       _cons |   20.43627   .0486025   420.48   0.000     20.3400
> 2                                                              
>      20.53253
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", replace dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. reghdfe ln_trade tr2 $ctrl0,  abs(ctry_id year) cluster(ctry_id
> ) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   7,    117)
>  =      12.80
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9777
                                                  Adj R-squared  
>  =     0.9755
                                                  Within R-sq.   
>  =     0.1724
Number of clusters (ctry_id) =        118         Root MSE       
>  =     0.3543

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
    ln_trade | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .2006956   .0682213     2.94   0.004     .065586
> 9                                                              
>      .3358043
       GDP_g |   .0047242   .0027996     1.69   0.094    -.000820
> 2                                                              
>      .0102686
   ln_GDP_pc |   1.244593   .1962422     6.34   0.000     .855945
> 5                                                              
>       1.63324
   EXP_ratio |   .0078398   .0033008     2.38   0.019     .001302
> 7                                                              
>      .0143769
   IMP_ratio |    .002867   .0021755     1.32   0.190    -.001441
> 5                                                              
>      .0071755
     polity2 |    .006175   .0102499     0.60   0.548    -.014124
> 5                                                              
>      .0264744
     FDI_NIF |   .0117719   .0033614     3.50   0.001     .005114
> 8                                                              
>      .0184289
       _cons |   9.967831   1.590326     6.27   0.000     6.81827
> 4                                                              
>      13.11739
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. 
. reghdfe ln_export tr2,  abs(ctry_id year) cluster(ctry_id) keep
> sing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   1,    117)
>  =      14.89
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0002
                                                  R-squared      
>  =     0.9708
                                                  Adj R-squared  
>  =     0.9681
                                                  Within R-sq.   
>  =     0.0292
Number of clusters (ctry_id) =        118         Root MSE       
>  =     0.3945

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .2765463   .0716709     3.86   0.000     .134605
> 9                                                              
>      .4184867
       _cons |   19.82977   .0462645   428.62   0.000     19.7381
> 5                                                              
>       19.9214
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. reghdfe ln_export tr2 $ctrl0,  abs(ctry_id year) cluster(ctry_i
> d) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   7,    117)
>  =      13.15
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9750
                                                  Adj R-squared  
>  =     0.9726
                                                  Within R-sq.   
>  =     0.1713
Number of clusters (ctry_id) =        118         Root MSE       
>  =     0.3653

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .2726241    .062136     4.39   0.000      .14956
> 7                                                              
>      .3956812
       GDP_g |   .0023365   .0031834     0.73   0.464     -.00396
> 8                                                              
>      .0086411
   ln_GDP_pc |   1.253255   .2867259     4.37   0.000     .685409
> 4                                                              
>      1.821101
   EXP_ratio |  -.0021074   .0032413    -0.65   0.517    -.008526
> 7                                                              
>      .0043119
   IMP_ratio |   .0076767   .0020611     3.72   0.000     .003594
> 8                                                              
>      .0117586
     polity2 |   .0162066     .01092     1.48   0.140    -.005419
> 9                                                              
>      .0378331
     FDI_NIF |   .0131108    .003506     3.74   0.000     .006167
> 4                                                              
>      .0200543
       _cons |   9.444008   2.294868     4.12   0.000     4.89914
> 2                                                              
>      13.98887
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. 
. reghdfe ln_import tr2,  abs(ctry_id year) cluster(ctry_id) keep
> sing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   1,    117)
>  =       0.30
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.5824
                                                  R-squared      
>  =     0.8695
                                                  Adj R-squared  
>  =     0.8575
                                                  Within R-sq.   
>  =     0.0007
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.4568

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_import | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |  -.1610851   .2921059    -0.55   0.582    -.739585
> 6                                                              
>      .4174153
       _cons |   18.61091   .1885581    98.70   0.000     18.2374
> 8                                                              
>      18.98434
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. reghdfe ln_import tr2 $ctrl0,  abs(ctry_id year) cluster(ctry_i
> d) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(   7,    117)
>  =       3.31
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0030
                                                  R-squared      
>  =     0.8716
                                                  Adj R-squared  
>  =     0.8591
                                                  Within R-sq.   
>  =     0.0167
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.4482

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_import | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |  -.0892621    .282118    -0.32   0.752    -.647981
> 9                                                              
>      .4694577
       GDP_g |   .0134074   .0065612     2.04   0.043     .000413
> 3                                                              
>      .0264016
   ln_GDP_pc |  -.3732225   .8722147    -0.43   0.670    -2.10059
> 8                                                              
>      1.354153
   EXP_ratio |   .0277162   .0081896     3.38   0.001     .011497
> 1                                                              
>      .0439353
   IMP_ratio |  -.0163726    .005394    -3.04   0.003    -.027055
> 1                                                              
>     -.0056901
     polity2 |   -.010935   .0288012    -0.38   0.705    -.067974
> 2                                                              
>      .0461042
     FDI_NIF |   .0066221   .0071608     0.92   0.357    -.007559
> 5                                                              
>      .0208036
       _cons |   21.14278   7.056396     3.00   0.003     7.16795
> 7                                                              
>       35.1176
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6A.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6A.xls
dir : seeout

. 
. ** TA6B_1_2
. use "Sample_ctry_ind_year.dta",clear

. drop if Income_Indicator_2000=="H"
(90,637 observations deleted)

. reghdfe ln_export tr2 $ctrl0,  abs(ctry_id sitc3 year) cluster(
> ctry_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 3 HDFE groups                           F(   7,    118)
>  =       8.94
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6307
                                                  Adj R-squared  
>  =     0.6302
                                                  Within R-sq.   
>  =     0.0041
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.4697

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .1617639   .0759154     2.13   0.035     .011430
> 8                                                              
>       .312097
       GDP_g |   .0116543   .0045626     2.55   0.012     .002619
> 2                                                              
>      .0206895
   ln_GDP_pc |   1.230695   .3103238     3.97   0.000     .616169
> 7                                                              
>      1.845221
   EXP_ratio |  -.0162203   .0050891    -3.19   0.002     -.02629
> 8                                                              
>     -.0061426
   IMP_ratio |   .0100304   .0033161     3.02   0.003     .003463
> 7                                                              
>      .0165972
     polity2 |  -.0043348   .0084879    -0.51   0.611    -.021143
> 2                                                              
>      .0124736
     FDI_NIF |    .009385   .0034132     2.75   0.007     .002625
> 9                                                              
>      .0161442
       _cons |   2.784587   2.465889     1.13   0.261    -2.09854
> 4                                                              
>      7.667718
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
       sitc3 |       237           1         236     |
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6B_1_2.xls", replace dec(3) 
> adjr2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6B_1_2.xls
dir : seeout

. reghdfe ln_export tr2 $ctrl0,  abs(ctry_id ind_yr) cluster(ctry
> _id) keepsing nowarn
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 2 HDFE groups                           F(   7,    118)
>  =      11.27
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6628
                                                  Adj R-squared  
>  =     0.6582
                                                  Within R-sq.   
>  =     0.0054
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.3741

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .1782951   .0698165     2.55   0.012     .040039
> 5                                                              
>      .3165508
       GDP_g |   .0110343   .0044444     2.48   0.014     .002233
> 2                                                              
>      .0198354
   ln_GDP_pc |   1.439667   .2946062     4.89   0.000     .856266
> 3                                                              
>      2.023067
   EXP_ratio |  -.0177383   .0047637    -3.72   0.000    -.027171
> 8                                                              
>     -.0083048
   IMP_ratio |   .0102953   .0032179     3.20   0.002     .003923
> 1                                                              
>      .0166676
     polity2 |   -.007023   .0083096    -0.85   0.400    -.023478
> 2                                                              
>      .0094322
     FDI_NIF |   .0086663   .0031716     2.73   0.007     .002385
> 7                                                              
>      .0149469
       _cons |   1.163568   2.344739     0.50   0.621    -3.47965
> 4                                                              
>       5.80679
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
      ind_yr |      3549           1        3548     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6B_1_2.xls", append dec(3) a
> djr2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6B_1_2.xls
dir : seeout

. 
. ** TA6B_3_4
. use "Sample_firm_ctry_year.dta",clear

. drop if Income_Indicator_2000=="H"
(2,474,469 observations deleted)

. reghdfe ln_export_value tr2 $ctrl1, abs(id_cs ctry_id year) clu
> ster(ctry_id) keepsing nowarn
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(   4,    117)
>  =     167.50
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3675
                                                  Adj R-squared  
>  =     0.3363
                                                  Within R-sq.   
>  =     0.0013
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6785

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0768554   .0277246     2.77   0.006     .021948
> 4                                                              
>      .1317625
        LNTA |   .1541501   .0073777    20.89   0.000     .139538
> 9                                                              
>      .1687613
         LEV |   .0175983   .0084294     2.09   0.039     .000904
> 2                                                              
>      .0342923
         ROA |   .2305336    .011023    20.91   0.000     .208703
> 2                                                              
>      .2523641
       _cons |   9.053413   .0871032   103.94   0.000      8.8809
> 1                                                              
>      9.225917
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6B_3_4.xls", replace dec(3) 
> adjr2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6B_3_4.xls
dir : seeout

. reghdfe ln_export_value tr2 $ctrl2, abs(id_cs ctry_id ind2#year
> ) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 52 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(  10,    117)
>  =      84.10
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3688
                                                  Adj R-squared  
>  =     0.3376
                                                  Within R-sq.   
>  =     0.0018
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6769

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0638282   .0213907     2.98   0.003      .02146
> 5                                                              
>      .1061915
        LNTA |   .1494013   .0067868    22.01   0.000     .135960
> 5                                                              
>      .1628422
         LEV |   .0208937    .008752     2.39   0.019     .003560
> 9                                                              
>      .0382266
         ROA |     .22686   .0107946    21.02   0.000     .205481
> 8                                                              
>      .2482383
       GDP_g |   .0022721   .0006991     3.25   0.002     .000887
> 5                                                              
>      .0036567
   ln_GDP_pc |   .5554842   .1699307     3.27   0.001     .218945
> 4                                                              
>       .892023
   EXP_ratio |  -.0052916   .0011811    -4.48   0.000    -.007630
> 7                                                              
>     -.0029525
   IMP_ratio |   .0044613   .0013258     3.36   0.001     .001835
> 5                                                              
>       .007087
     polity2 |   .0014837    .003905     0.38   0.705    -.006249
> 9                                                              
>      .0092173
     FDI_NIF |    .000083   .0010143     0.08   0.935    -.001925
> 8                                                              
>      .0020917
       _cons |   4.342067   1.523215     2.85   0.005     1.32541
> 9                                                              
>      7.358715
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
   ind2#year |       413           3         410     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA6B_3_4.xls", append  dec(3) 
> adjr2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA6B_3_4.xls
dir : seeout

. 
. *** TA7
. use "Sample_ctry_ind_year.dta",clear

. drop if Income_Indicator_2000=="H"
(90,637 observations deleted)

. reghdfe ln_export tr2 tr2_rca3_cn RCA_sitc3_china $ctrl0,  abs(
> ctry_id sitc3 year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 3 HDFE groups                           F(   9,    118)
>  =      52.41
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6341
                                                  Adj R-squared  
>  =     0.6336
                                                  Within R-sq.   
>  =     0.0133
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.4582

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .3073826   .0929912     3.31   0.001     .123234
> 7                                                              
>      .4915305
 tr2_rca3_cn |  -.1151389   .0419368    -2.75   0.007    -.198185
> 2                                                              
>     -.0320926
RCA_sitc3_~a |   .6245146   .0315424    19.80   0.000     .562052
> 1                                                              
>      .6869772
       GDP_g |   .0116145   .0045542     2.55   0.012      .00259
> 6                                                              
>       .020633
   ln_GDP_pc |   1.257879   .3108815     4.05   0.000     .642248
> 9                                                              
>      1.873509
   EXP_ratio |  -.0163186   .0050808    -3.21   0.002      -.0263
> 8                                                              
>     -.0062572
   IMP_ratio |   .0100846   .0032825     3.07   0.003     .003584
> 3                                                              
>      .0165849
     polity2 |  -.0041407   .0084506    -0.49   0.625    -.020875
> 2                                                              
>      .0125939
     FDI_NIF |   .0093463    .003389     2.76   0.007     .002635
> 2                                                              
>      .0160575
       _cons |   1.781558   2.480593     0.72   0.474    -3.13069
> 2                                                              
>      6.693808
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
       sitc3 |       237           1         236     |
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA7.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA7.xls
dir : seeout

. reghdfe ln_export tr2 tr2_rca3_cn RCA_sitc3_china $ctrl0,  abs(
> ctry_id ind_yr) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)
note: RCA_sitc3_china is probably collinear with the fixed effect
> s (all partialled-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 2 HDFE groups                           F(   8,    118)
>  =      11.91
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6637
                                                  Adj R-squared  
>  =     0.6591
                                                  Within R-sq.   
>  =     0.0079
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.3711

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .4547282    .094269     4.82   0.000     .268049
> 9                                                              
>      .6414066
 tr2_rca3_cn |  -.2203166   .0508979    -4.33   0.000    -.321108
> 2                                                              
>      -.119525
RCA_sitc3_~a |          0  (omitted)
       GDP_g |   .0110267   .0044484     2.48   0.015     .002217
> 7                                                              
>      .0198357
   ln_GDP_pc |    1.44895   .2952533     4.91   0.000     .864268
> 1                                                              
>      2.033632
   EXP_ratio |  -.0176609   .0047484    -3.72   0.000    -.027064
> 1                                                              
>     -.0082578
   IMP_ratio |   .0102445   .0031716     3.23   0.002     .003963
> 9                                                              
>      .0165251
     polity2 |  -.0066818   .0083309    -0.80   0.424    -.023179
> 1                                                              
>      .0098156
     FDI_NIF |   .0086382   .0031721     2.72   0.007     .002356
> 6                                                              
>      .0149197
       _cons |   1.085871   2.350516     0.46   0.645     -3.5687
> 9                                                              
>      5.740532
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
      ind_yr |      3549           1        3548     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA7.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA7.xls
dir : seeout

. 
. reghdfe ln_export tr2 tr2_rca2_cn RCA_sitc2_china $ctrl0,  abs(
> ctry_id sitc3 year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 3 HDFE groups                           F(   9,    118)
>  =      43.11
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6327
                                                  Adj R-squared  
>  =     0.6322
                                                  Within R-sq.   
>  =     0.0095
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.4629

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |    .325207   .0998548     3.26   0.001     .127467
> 3                                                              
>      .5229467
 tr2_rca2_cn |  -.1452634   .0541533    -2.68   0.008    -.252501
> 8                                                              
>     -.0380251
RCA_sitc2_~a |   .6907856   .0378883    18.23   0.000     .615756
> 5                                                              
>      .7658148
       GDP_g |   .0115547    .004572     2.53   0.013     .002500
> 9                                                              
>      .0206084
   ln_GDP_pc |   1.252237     .31174     4.02   0.000     .634907
> 2                                                              
>      1.869567
   EXP_ratio |  -.0163107   .0050871    -3.21   0.002    -.026384
> 5                                                              
>     -.0062368
   IMP_ratio |   .0100699   .0032896     3.06   0.003     .003555
> 6                                                              
>      .0165843
     polity2 |   -.004197   .0084849    -0.49   0.622    -.020999
> 4                                                              
>      .0126053
     FDI_NIF |   .0093757   .0034064     2.75   0.007     .002630
> 1                                                              
>      .0161213
       _cons |   1.829035   2.486567     0.74   0.463    -3.09504
> 5                                                              
>      6.753115
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
       sitc3 |       237           1         236     |
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA7.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA7.xls
dir : seeout

. reghdfe ln_export tr2 tr2_rca2_cn RCA_sitc2_china $ctrl0,  abs(
> ctry_id ind_yr) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 6 iterations)
note: RCA_sitc2_china is probably collinear with the fixed effect
> s (all partialled-out values are close to zero; tol = 1.0e-09)

HDFE Linear regression                            Number of obs  
>  =    273,324
Absorbing 2 HDFE groups                           F(   8,    118)
>  =      11.60
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6638
                                                  Adj R-squared  
>  =     0.6592
                                                  Within R-sq.   
>  =     0.0081
Number of clusters (ctry_id) =        119         Root MSE       
>  =     2.3708

                              (Std. err. adjusted for 119 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |    .488961   .1032475     4.74   0.000     .284502
> 8                                                              
>      .6934193
 tr2_rca2_cn |  -.2769463   .0655612    -4.22   0.000    -.406775
> 4                                                              
>     -.1471173
RCA_sitc2_~a |          0  (omitted)
       GDP_g |   .0110428   .0044567     2.48   0.015     .002217
> 2                                                              
>      .0198683
   ln_GDP_pc |    1.45411   .2953513     4.92   0.000     .869234
> 3                                                              
>      2.038986
   EXP_ratio |  -.0177698   .0047628    -3.73   0.000    -.027201
> 5                                                              
>     -.0083381
   IMP_ratio |   .0102629   .0031749     3.23   0.002     .003975
> 7                                                              
>      .0165502
     polity2 |  -.0066462   .0083457    -0.80   0.427     -.02317
> 3                                                              
>      .0098806
     FDI_NIF |   .0086481   .0031838     2.72   0.008     .002343
> 3                                                              
>      .0149529
       _cons |   1.051789   2.351392     0.45   0.655    -3.60460
> 7                                                              
>      5.708185
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       119         119           0    *|
      ind_yr |      3549           1        3548     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA7.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA7.xls
dir : seeout

. 
. *** TA8
. use "Sample_ctry_ind_year_US.dta",clear

. reghdfe ln_export ln_us_aid_val $ctrl0,  abs(ctry_id sitc3 year
> ) cluster(ctry_id) keepsing nowarn 
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =    383,918
Absorbing 3 HDFE groups                           F(   7,    147)
>  =       8.75
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6145
                                                  Adj R-squared  
>  =     0.6141
                                                  Within R-sq.   
>  =     0.0025
Number of clusters (ctry_id) =        148         Root MSE       
>  =     2.5571

                              (Std. err. adjusted for 148 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_us_aid_~l |   .0036838   .0059008     0.62   0.533    -.007977
> 5                                                              
>       .015345
       GDP_g |   .0123533   .0042801     2.89   0.004     .003894
> 9                                                              
>      .0208117
   ln_GDP_pc |   .9788095   .2357402     4.15   0.000     .512931
> 9                                                              
>      1.444687
   EXP_ratio |  -.0080684   .0038909    -2.07   0.040    -.015757
> 8                                                              
>      -.000379
   IMP_ratio |   .0092829   .0026017     3.57   0.000     .004141
> 4                                                              
>      .0144245
     polity2 |  -.0004787   .0114493    -0.04   0.967    -.023105
> 2                                                              
>      .0221478
     FDI_NIF |   .0044134   .0018049     2.45   0.016     .000846
> 4                                                              
>      .0079804
       _cons |   4.176787   2.058507     2.03   0.044     .108697
> 9                                                              
>      8.244877
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       148         148           0    *|
       sitc3 |       237           1         236     |
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA8.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA8.xls
dir : seeout

. reghdfe ln_export ln_us_aid_val $ctrl0,  abs(ctry_id sitc3_yr) 
> cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =    383,918
Absorbing 2 HDFE groups                           F(   7,    147)
>  =       8.47
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6249
                                                  Adj R-squared  
>  =     0.6213
                                                  Within R-sq.   
>  =     0.0025
Number of clusters (ctry_id) =        148         Root MSE       
>  =     2.5334

                              (Std. err. adjusted for 148 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_us_aid_~l |   .0043151   .0058703     0.74   0.463     -.00728
> 6                                                              
>      .0159162
       GDP_g |   .0124541   .0042552     2.93   0.004     .004044
> 9                                                              
>      .0208633
   ln_GDP_pc |   .9697494   .2360539     4.11   0.000     .503251
> 8                                                              
>      1.436247
   EXP_ratio |  -.0081495   .0039206    -2.08   0.039    -.015897
> 5                                                              
>     -.0004016
   IMP_ratio |   .0092081   .0026148     3.52   0.001     .004040
> 7                                                              
>      .0143755
     polity2 |  -.0013241   .0114348    -0.12   0.908     -.02392
> 2                                                              
>      .0212738
     FDI_NIF |   .0043478   .0018146     2.40   0.018     .000761
> 8                                                              
>      .0079339
       _cons |   4.256243   2.061378     2.06   0.041     .182479
> 8                                                              
>      8.330007
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       148         148           0    *|
    sitc3_yr |      3555           1        3554     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA8.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA8.xls
dir : seeout

. reghdfe ln_export ln_us_aid_val ln_us_aid_val_rca3_usa RCA_sitc
> 3_usa $ctrl0,   abs(ctry_id sitc3 year) cluster(ctry_id) keepsi
> ng nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =    383,918
Absorbing 3 HDFE groups                           F(   9,    147)
>  =      50.98
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6155
                                                  Adj R-squared  
>  =     0.6151
                                                  Within R-sq.   
>  =     0.0050
Number of clusters (ctry_id) =        148         Root MSE       
>  =     2.5539

                              (Std. err. adjusted for 148 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_us_aid_~l |   .0001052   .0062891     0.02   0.987    -.012323
> 6                                                              
>       .012534
ln_us_aid_~a |    .003399   .0038766     0.88   0.382     -.00426
> 2                                                              
>        .01106
RCA_sitc3_~a |   .4092244   .0626296     6.53   0.000     .285453
> 8                                                              
>       .532995
       GDP_g |   .0123622   .0042834     2.89   0.004     .003897
> 2                                                              
>      .0208272
   ln_GDP_pc |   .9830024   .2357038     4.17   0.000     .517196
> 8                                                              
>      1.448808
   EXP_ratio |   -.008093   .0038919    -2.08   0.039    -.015784
> 3                                                              
>     -.0004018
   IMP_ratio |   .0093048   .0026004     3.58   0.000     .004165
> 8                                                              
>      .0144438
     polity2 |   -.000343   .0114411    -0.03   0.976    -.022953
> 2                                                              
>      .0222672
     FDI_NIF |   .0044033   .0018157     2.43   0.017     .000815
> 1                                                              
>      .0079914
       _cons |   3.715872    2.06845     1.80   0.074    -.371868
> 1                                                              
>      7.803612
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       148         148           0    *|
       sitc3 |       237           1         236     |
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA8.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA8.xls
dir : seeout

. reghdfe ln_export ln_us_aid_val ln_us_aid_val_rca3_usa $ctrl0, 
>  abs(ctry_id sitc3_yr) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =    383,918
Absorbing 2 HDFE groups                           F(   8,    147)
>  =       7.73
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.6249
                                                  Adj R-squared  
>  =     0.6213
                                                  Within R-sq.   
>  =     0.0026
Number of clusters (ctry_id) =        148         Root MSE       
>  =     2.5333

                              (Std. err. adjusted for 148 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_us_aid_~l |   .0007998   .0064131     0.12   0.901    -.011874
> 1                                                              
>      .0134737
ln_us_aid_~a |   .0035027   .0041606     0.84   0.401    -.004719
> 7                                                              
>       .011725
       GDP_g |   .0124468   .0042561     2.92   0.004     .004035
> 7                                                              
>      .0208578
   ln_GDP_pc |   .9691396   .2361728     4.10   0.000      .50240
> 7                                                              
>      1.435872
   EXP_ratio |  -.0081384   .0039231    -2.07   0.040    -.015891
> 3                                                              
>     -.0003855
   IMP_ratio |   .0092022   .0026165     3.52   0.001     .004031
> 5                                                              
>      .0143729
     polity2 |  -.0013321   .0114351    -0.12   0.907    -.023930
> 6                                                              
>      .0212664
     FDI_NIF |   .0043522   .0018162     2.40   0.018      .00076
> 3                                                              
>      .0079414
       _cons |   4.259327   2.061922     2.07   0.041     .184489
> 1                                                              
>      8.334165
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       148         148           0    *|
    sitc3_yr |      3555           1        3554     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA8.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA8.xls
dir : seeout

. 
. *** TA9
. use "Sample_firm_ctry_year.dta",clear

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex,
>  abs(id_cs ctry_id year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 3 HDFE groups                           F(   2,    146)
>  =      19.56
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3192
                                                  Adj R-squared  
>  =     0.2990
                                                  Within R-sq.   
>  =     0.0002
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8376

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |   .0231573   .0085089     2.72   0.007     .006340
> 8                                                              
>      .0399737
ln_tr2_val~x |   .0484552    .008116     5.97   0.000     .032415
> 1                                                              
>      .0644952
       _cons |   10.85486    .047332   229.33   0.000     10.7613
> 2                                                              
>      10.94841
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    144546           1      144545     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA9.xls", replace dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA9.xls
dir : seeout

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex 
> $ctrl1, abs(id_cs ctry_id year) cluster(ctry_id) keepsing nowar
> n
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 3 HDFE groups                           F(   5,    146)
>  =      53.13
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3204
                                                  Adj R-squared  
>  =     0.3002
                                                  Within R-sq.   
>  =     0.0019
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8360

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |   .0211697   .0083983     2.52   0.013     .004571
> 7                                                              
>      .0377676
ln_tr2_val~x |   .0523825   .0081751     6.41   0.000     .036225
> 7                                                              
>      .0685392
        LNTA |   .1932107    .012177    15.87   0.000     .169144
> 8                                                              
>      .2172766
         LEV |   .0373195   .0073985     5.04   0.000     .022697
> 5                                                              
>      .0519415
         ROA |   .2866956   .0197682    14.50   0.000     .247626
> 7                                                              
>      .3257644
       _cons |   8.701472    .147653    58.93   0.000     8.40965
> 9                                                              
>      8.993286
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    144546           1      144545     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA9.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA9.xls
dir : seeout

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex 
> $ctrl2, abs(id_cs ctry_id year) cluster(ctry_id) keepsing nowar
> n
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 3 HDFE groups                           F(  11,    146)
>  =      27.81
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3206
                                                  Adj R-squared  
>  =     0.3004
                                                  Within R-sq.   
>  =     0.0023
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8357

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |  -.0010527   .0095395    -0.11   0.912    -.019906
> 1                                                              
>      .0178006
ln_tr2_val~x |   .0529491   .0082065     6.45   0.000     .036730
> 3                                                              
>       .069168
        LNTA |   .1935304    .012098    16.00   0.000     .169620
> 5                                                              
>      .2174402
         LEV |   .0380203   .0072919     5.21   0.000      .02360
> 9                                                              
>      .0524316
         ROA |   .2868793   .0197677    14.51   0.000     .247811
> 5                                                              
>       .325947
       GDP_g |   .0034161   .0011943     2.86   0.005     .001055
> 8                                                              
>      .0057764
   ln_GDP_pc |   .4036544   .1363353     2.96   0.004     .134208
> 7                                                              
>         .6731
   EXP_ratio |  -.0042628   .0013177    -3.24   0.002    -.006866
> 9                                                              
>     -.0016586
   IMP_ratio |   .0041261   .0012858     3.21   0.002     .001584
> 8                                                              
>      .0066673
     polity2 |   .0001897    .003351     0.06   0.955    -.006433
> 1                                                              
>      .0068125
     FDI_NIF |  -.0003025   .0002757    -1.10   0.274    -.000847
> 4                                                              
>      .0002423
       _cons |   4.933952   1.336776     3.69   0.000     2.29202
> 1                                                              
>      7.575884
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    144546           1      144545     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA9.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA9.xls
dir : seeout

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex 
> $ctrl2, abs(id_cs ctry_id ind2#year) cluster(ctry_id) keepsing 
> nowarn
(MWFE estimator converged in 53 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 3 HDFE groups                           F(  11,    146)
>  =      26.81
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3214
                                                  Adj R-squared  
>  =     0.3012
                                                  Within R-sq.   
>  =     0.0021
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8347

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |  -.0025374   .0094146    -0.27   0.788    -.021143
> 9                                                              
>       .016069
ln_tr2_val~x |   .0488333   .0080355     6.08   0.000     .032952
> 4                                                              
>      .0647142
        LNTA |   .1863362   .0118973    15.66   0.000      .16282
> 3                                                              
>      .2098493
         LEV |    .038817   .0068475     5.67   0.000     .025284
> 1                                                              
>        .05235
         ROA |    .282288   .0194386    14.52   0.000     .243870
> 7                                                              
>      .3207054
       GDP_g |   .0034768   .0012069     2.88   0.005     .001091
> 5                                                              
>      .0058622
   ln_GDP_pc |    .401343   .1336685     3.00   0.003     .137167
> 9                                                              
>      .6655181
   EXP_ratio |  -.0041653   .0013203    -3.15   0.002    -.006774
> 6                                                              
>      -.001556
   IMP_ratio |   .0041397   .0012665     3.27   0.001     .001636
> 7                                                              
>      .0066428
     polity2 |   .0000678   .0034743     0.02   0.984    -.006798
> 6                                                              
>      .0069342
     FDI_NIF |  -.0003099   .0002713    -1.14   0.255    -.000846
> 1                                                              
>      .0002263
       _cons |   5.040728   1.308768     3.85   0.000      2.4541
> 5                                                              
>      7.627306
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    144546           1      144545     |
     ctry_id |       147         147           0    *|
   ind2#year |       416           2         414     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA9.xls", append dec(3) adjr2 
>  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA9.xls
dir : seeout

. 
. *** TA10
. use "Sample_firm_ctry_year.dta",clear

. reghdfe ln_export_value tr2 tr2_soex $ctrl2, abs(id_cs ctry_id 
> ind2#year provid#year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 54 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 4 HDFE groups                           F(  11,    146)
>  =      28.49
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3217
                                                  Adj R-squared  
>  =     0.3014
                                                  Within R-sq.   
>  =     0.0022
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8344

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0609529   .0233439     2.61   0.010     .014817
> 3                                                              
>      .1070884
    tr2_soex |   .2334008   .0410174     5.69   0.000     .152336
> 3                                                              
>      .3144654
        LNTA |   .1832903    .011192    16.38   0.000     .161171
> 1                                                              
>      .2054096
         LEV |   .0325947    .006378     5.11   0.000     .019989
> 6                                                              
>      .0451998
         ROA |   .2900273   .0209098    13.87   0.000     .248702
> 2                                                              
>      .3313524
       GDP_g |   .0031843   .0012415     2.56   0.011     .000730
> 6                                                              
>      .0056379
   ln_GDP_pc |    .397658   .1176881     3.38   0.001     .165065
> 7                                                              
>      .6302503
   EXP_ratio |  -.0040062   .0011836    -3.38   0.001    -.006345
> 4                                                              
>      -.001667
   IMP_ratio |    .004142   .0012069     3.43   0.001     .001756
> 8                                                              
>      .0065273
     polity2 |   .0014542   .0038194     0.38   0.704    -.006094
> 2                                                              
>      .0090027
     FDI_NIF |  -.0002958   .0002806    -1.05   0.293    -.000850
> 3                                                              
>      .0002587
       _cons |   5.074395   1.171372     4.33   0.000      2.7593
> 6                                                              
>      7.389431
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-------------------------------------------------------+
   Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------+---------------------------------------|
         id_cs |    144546           1      144545     |
       ctry_id |       147         147           0    *|
     ind2#year |       416           2         414     |
   provid#year |       425          32         393    ?|
-------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA10.xls", replace dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA10.xls
dir : seeout

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex 
> $ctrl2, abs(id_cs ctry_id ind2#year provid#year) cluster(ctry_i
> d) keepsing nowarn
(MWFE estimator converged in 54 iterations)

HDFE Linear regression                            Number of obs  
>  =  5,012,185
Absorbing 4 HDFE groups                           F(  11,    146)
>  =      28.15
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3216
                                                  Adj R-squared  
>  =     0.3013
                                                  Within R-sq.   
>  =     0.0020
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8345

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |  -.0031731   .0093457    -0.34   0.735    -.021643
> 4                                                              
>      .0152972
ln_tr2_val~x |   .0483491   .0078377     6.17   0.000     .032859
> 2                                                              
>      .0638391
        LNTA |    .183862   .0112132    16.40   0.000     .161700
> 8                                                              
>      .2060232
         LEV |   .0324358   .0063837     5.08   0.000     .019819
> 3                                                              
>      .0450523
         ROA |   .2904414   .0209002    13.90   0.000     .249135
> 4                                                              
>      .3317474
       GDP_g |   .0035245   .0012335     2.86   0.005     .001086
> 7                                                              
>      .0059624
   ln_GDP_pc |   .4035254   .1329212     3.04   0.003     .140827
> 1                                                              
>      .6662237
   EXP_ratio |  -.0041936   .0013082    -3.21   0.002     -.00677
> 9                                                              
>     -.0016083
   IMP_ratio |   .0041422   .0012543     3.30   0.001     .001663
> 2                                                              
>      .0066211
     polity2 |   .0001251   .0034603     0.04   0.971    -.006713
> 6                                                              
>      .0069639
     FDI_NIF |  -.0002942   .0002749    -1.07   0.286    -.000837
> 5                                                              
>      .0002491
       _cons |   5.054006   1.295616     3.90   0.000      2.4934
> 2                                                              
>      7.614591
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-------------------------------------------------------+
   Absorbed FE | Categories  - Redundant  = Num. Coefs |
---------------+---------------------------------------|
         id_cs |    144546           1      144545     |
       ctry_id |       147         147           0    *|
     ind2#year |       416           2         414     |
   provid#year |       425          32         393    ?|
-------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA10.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA10.xls
dir : seeout

. 
. reghdfe ln_export_value tr2 tr2_soex $ctrl2 if year_num==14, ab
> s(id_cs ctry_id year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 8 iterations)

HDFE Linear regression                            Number of obs  
>  =    226,389
Absorbing 3 HDFE groups                           F(  11,    145)
>  =      22.93
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3297
                                                  Adj R-squared  
>  =     0.3254
                                                  Within R-sq.   
>  =     0.0039
Number of clusters (ctry_id) =        146         Root MSE       
>  =     2.0796

                              (Std. err. adjusted for 146 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0728391   .0393643     1.85   0.066    -.004962
> 9                                                              
>       .150641
    tr2_soex |   .4925424   .0786954     6.26   0.000     .337004
> 1                                                              
>      .6480806
        LNTA |   .2673879   .0207881    12.86   0.000      .22630
> 1                                                              
>      .3084748
         LEV |   .0679918   .0365278     1.86   0.065    -.004203
> 9                                                              
>      .1401875
         ROA |   .3177089    .045977     6.91   0.000     .226837
> 1                                                              
>      .4085806
       GDP_g |   .0003401   .0017538     0.19   0.847    -.003126
> 2                                                              
>      .0038063
   ln_GDP_pc |   .4615981   .2152656     2.14   0.034     .036134
> 4                                                              
>      .8870618
   EXP_ratio |  -.0034535   .0022162    -1.56   0.121    -.007833
> 8                                                              
>      .0009267
   IMP_ratio |   .0060757   .0021422     2.84   0.005     .001841
> 8                                                              
>      .0103097
     polity2 |  -.0035997   .0071492    -0.50   0.615    -.017729
> 8                                                              
>      .0105304
     FDI_NIF |  -.0001387   .0006474    -0.21   0.831    -.001418
> 4                                                              
>      .0011409
       _cons |   3.597283   2.113399     1.70   0.091    -.579764
> 2                                                              
>       7.77433
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |      1280           1        1279     |
     ctry_id |       146         146           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA10.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA10.xls
dir : seeout

. reghdfe ln_export_value ln_tr2_valx_pred ln_tr2_valx_pred_soex 
> $ctrl2 if year_num==14, abs(id_cs ctry_id year) cluster(ctry_id
> ) keepsing nowarn
(MWFE estimator converged in 8 iterations)

HDFE Linear regression                            Number of obs  
>  =    226,389
Absorbing 3 HDFE groups                           F(  11,    145)
>  =      22.53
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3294
                                                  Adj R-squared  
>  =     0.3250
                                                  Within R-sq.   
>  =     0.0034
Number of clusters (ctry_id) =        146         Root MSE       
>  =     2.0802

                              (Std. err. adjusted for 146 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
ln_tr2_val~d |   .0036459   .0151666     0.24   0.810    -.026330
> 3                                                              
>      .0336221
ln_tr2_val~x |   .1021707   .0183886     5.56   0.000     .065826
> 2                                                              
>      .1385151
        LNTA |   .2670319   .0207899    12.84   0.000     .225941
> 4                                                              
>      .3081224
         LEV |   .0674569   .0364161     1.85   0.066    -.004518
> 1                                                              
>      .1394318
         ROA |   .3199619   .0459128     6.97   0.000     .229217
> 1                                                              
>      .4107067
       GDP_g |   .0009121   .0017887     0.51   0.611    -.002623
> 3                                                              
>      .0044474
   ln_GDP_pc |   .4355303    .248332     1.75   0.082    -.055287
> 9                                                              
>      .9263485
   EXP_ratio |  -.0038724   .0024281    -1.59   0.113    -.008671
> 5                                                              
>      .0009268
   IMP_ratio |   .0062852   .0022903     2.74   0.007     .001758
> 5                                                              
>      .0108118
     polity2 |  -.0069263   .0068084    -1.02   0.311    -.020382
> 8                                                              
>      .0065301
     FDI_NIF |  -.0001983   .0006323    -0.31   0.754     -.00144
> 8                                                              
>      .0010514
       _cons |   3.847075   2.390835     1.61   0.110     -.87831
> 3                                                              
>      8.572463
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |      1280           1        1279     |
     ctry_id |       146         146           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA10.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA10.xls
dir : seeout

. 
. *** TA11
. use "Sample_firm_ctry_year.dta",clear

. drop if Income_Indicator_2000=="H"
(2,474,469 observations deleted)

. reghdfe ln_export_value tr2 tr2_soex, abs(id_cs ctry_id year) c
> luster(ctry_id) keepsing nowarn
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(   2,    117)
>  =      15.00
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3668
                                                  Adj R-squared  
>  =     0.3355
                                                  Within R-sq.   
>  =     0.0002
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6795

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0620792   .0314053     1.98   0.050    -.000117
> 4                                                              
>      .1242758
    tr2_soex |    .134495   .0529172     2.54   0.012     .029695
> 2                                                              
>      .2392948
       _cons |   10.80345   .0197403   547.28   0.000     10.7643
> 5                                                              
>      10.84254
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA11.xls", replace dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA11.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex $ctrl1, abs(id_cs ctry_id 
> year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 10 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(   5,    117)
>  =     136.58
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3676
                                                  Adj R-squared  
>  =     0.3364
                                                  Within R-sq.   
>  =     0.0014
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6784

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0624007     .03106     2.01   0.047     .000888
> 1                                                              
>      .1239133
    tr2_soex |   .1422453   .0530102     2.68   0.008     .037261
> 5                                                              
>      .2472292
        LNTA |   .1548938   .0073266    21.14   0.000     .140383
> 8                                                              
>      .1694038
         LEV |   .0171668   .0084096     2.04   0.043     .000512
> 1                                                              
>      .0338215
         ROA |   .2305503   .0110076    20.94   0.000     .208750
> 3                                                              
>      .2523503
       _cons |   9.048193   .0867106   104.35   0.000     8.87646
> 7                                                              
>      9.219919
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA11.xls", append  dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA11.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex $ctrl2, abs(id_cs ctry_id 
> year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(  11,    117)
>  =      79.02
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3679
                                                  Adj R-squared  
>  =     0.3367
                                                  Within R-sq.   
>  =     0.0020
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6780

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0550366    .024566     2.24   0.027     .006384
> 9                                                              
>      .1036882
    tr2_soex |    .149327   .0518429     2.88   0.005      .04665
> 5                                                              
>      .2519991
        LNTA |   .1548303   .0072564    21.34   0.000     .140459
> 3                                                              
>      .1692013
         LEV |   .0173757   .0084475     2.06   0.042     .000645
> 8                                                              
>      .0341056
         ROA |   .2298628   .0109732    20.95   0.000      .20813
> 1                                                              
>      .2515945
       GDP_g |   .0022184   .0006976     3.18   0.002     .000836
> 8                                                              
>         .0036
   ln_GDP_pc |   .5554075   .1780089     3.12   0.002     .202870
> 2                                                              
>      .9079448
   EXP_ratio |  -.0055883   .0011895    -4.70   0.000    -.007944
> 1                                                              
>     -.0032325
   IMP_ratio |   .0043679   .0013671     3.19   0.002     .001660
> 3                                                              
>      .0070755
     polity2 |   .0018027   .0039141     0.46   0.646     -.00594
> 9                                                              
>      .0095544
     FDI_NIF |   .0000552   .0010323     0.05   0.957    -.001989
> 3                                                              
>      .0020997
       _cons |   4.297138    1.59606     2.69   0.008     1.13622
> 6                                                              
>      7.458051
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA11.xls", append  dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA11.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex $ctrl2, abs(id_cs ctry_id 
> ind2#year) cluster(ctry_id) keepsing nowarn
(MWFE estimator converged in 52 iterations)

HDFE Linear regression                            Number of obs  
>  =  2,537,716
Absorbing 3 HDFE groups                           F(  11,    117)
>  =      77.62
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3689
                                                  Adj R-squared  
>  =     0.3376
                                                  Within R-sq.   
>  =     0.0019
Number of clusters (ctry_id) =        118         Root MSE       
>  =     1.6769

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0490368   .0236648     2.07   0.040       .0021
> 7                                                              
>      .0959037
    tr2_soex |   .1409775    .052788     2.67   0.009     .036433
> 6                                                              
>      .2455214
        LNTA |   .1501896   .0067571    22.23   0.000     .136807
> 4                                                              
>      .1635717
         LEV |   .0203592   .0087499     2.33   0.022     .003030
> 6                                                              
>      .0376879
         ROA |   .2269031   .0107937    21.02   0.000     .205526
> 9                                                              
>      .2482794
       GDP_g |   .0022912   .0006929     3.31   0.001      .00091
> 9                                                              
>      .0036634
   ln_GDP_pc |   .5569392   .1716942     3.24   0.002     .216907
> 8                                                              
>      .8969707
   EXP_ratio |  -.0054191   .0011748    -4.61   0.000    -.007745
> 8                                                              
>     -.0030925
   IMP_ratio |   .0044811   .0013355     3.36   0.001     .001836
> 1                                                              
>       .007126
     polity2 |   .0015041   .0039419     0.38   0.703    -.006302
> 7                                                              
>      .0093108
     FDI_NIF |   .0000895   .0010122     0.09   0.930    -.001915
> 1                                                              
>      .0020942
       _cons |   4.328292   1.538582     2.81   0.006     1.28121
> 1                                                              
>      7.375372
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    119141           1      119140     |
     ctry_id |       118         118           0    *|
   ind2#year |       413           3         410     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA11.xls", append  dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA11.xls
dir : seeout

. 
. *** TA12
. use "Sample_firm_ctry_year.dta",clear

. * sales growth
. reghdfe ln_export_value tr2 tr2_soex tr2_soex_gsale soex_gsale 
> tr2_gsale gsale_lag, abs(id_cs ctry_id year) cluster(ctry_id) k
> eepsing nowarn
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs  
>  =  3,490,702
Absorbing 3 HDFE groups                           F(   6,    146)
>  =      22.04
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3212
                                                  Adj R-squared  
>  =     0.2996
                                                  Within R-sq.   
>  =     0.0005
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8619

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0873718   .0281043     3.11   0.002      .03182
> 8                                                              
>      .1429155
    tr2_soex |   .2500302   .0399707     6.26   0.000     .171034
> 3                                                              
>      .3290261
tr2_soex_g~e |   .0121263   .0158508     0.77   0.445    -.019200
> 4                                                              
>      .0434531
  soex_gsale |   .0015153   .0111622     0.14   0.892    -.020545
> 2                                                              
>      .0235757
   tr2_gsale |   .0121304   .0080693     1.50   0.135    -.003817
> 2                                                              
>       .028078
   gsale_lag |   .0379854   .0055233     6.88   0.000     .027069
> 4                                                              
>      .0489014
       _cons |   10.99278   .0100793  1090.63   0.000     10.9728
> 6                                                              
>       11.0127
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    107318           1      107317     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA12.xls", replace dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA12.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex tr2_soex_gsale soex_gsale 
> tr2_gsale gsale_lag LNTA LEV ROA , abs(id_cs ctry_id year) clus
> ter(ctry_id) keepsing nowarn
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs  
>  =  3,490,702
Absorbing 3 HDFE groups                           F(   9,    146)
>  =      50.59
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3221
                                                  Adj R-squared  
>  =     0.3006
                                                  Within R-sq.   
>  =     0.0018
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8606

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0850577   .0275093     3.09   0.002     .030689
> 8                                                              
>      .1394257
    tr2_soex |     .25451   .0399669     6.37   0.000     .175521
> 7                                                              
>      .3334984
tr2_soex_g~e |   .0068901   .0160456     0.43   0.668    -.024821
> 6                                                              
>      .0386017
  soex_gsale |  -.0013914   .0112695    -0.12   0.902    -.023663
> 9                                                              
>      .0208811
   tr2_gsale |   .0103105   .0082501     1.25   0.213    -.005994
> 6                                                              
>      .0266156
   gsale_lag |   .0299196   .0051105     5.85   0.000     .019819
> 5                                                              
>      .0400197
        LNTA |   .1867409   .0115351    16.19   0.000     .163943
> 7                                                              
>      .2095381
         LEV |     .04493   .0080573     5.58   0.000     .029005
> 9                                                              
>      .0608541
         ROA |    .267187   .0178323    14.98   0.000     .231944
> 2                                                              
>      .3024298
       _cons |   8.865062    .134626    65.85   0.000     8.59899
> 5                                                              
>      9.131129
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    107318           1      107317     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA12.xls", append  dec(3) adjr
> 2  e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA12.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex tr2_soex_gsale soex_gsale 
> tr2_gsale gsale_lag LNTA LEV ROA GDP_g ln_GDP_pc EXP_ratio IMP_
> ratio polity2 FDI_NIF, abs(id_cs ctry_id year) cluster(ctry_id)
>  keepsing nowarn
(MWFE estimator converged in 11 iterations)

HDFE Linear regression                            Number of obs  
>  =  3,490,702
Absorbing 3 HDFE groups                           F(  15,    146)
>  =      35.85
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3224
                                                  Adj R-squared  
>  =     0.3009
                                                  Within R-sq.   
>  =     0.0023
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8602

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0604389   .0245513     2.46   0.015     .011917
> 2                                                              
>      .1089607
    tr2_soex |   .2676038   .0424084     6.31   0.000     .183790
> 1                                                              
>      .3514175
tr2_soex_g~e |    .004669   .0158241     0.30   0.768     -.02660
> 5                                                              
>       .035943
  soex_gsale |   .0010267   .0112332     0.09   0.927     -.02117
> 4                                                              
>      .0232274
   tr2_gsale |   .0168212   .0089888     1.87   0.063    -.000943
> 8                                                              
>      .0345863
   gsale_lag |   .0276622   .0056008     4.94   0.000     .016593
> 1                                                              
>      .0387314
        LNTA |   .1860493   .0114227    16.29   0.000     .163474
> 1                                                              
>      .2086244
         LEV |   .0454187     .00797     5.70   0.000     .029667
> 2                                                              
>      .0611703
         ROA |   .2671677   .0178296    14.98   0.000     .231930
> 2                                                              
>      .3024052
       GDP_g |   .0033237   .0014195     2.34   0.021     .000518
> 4                                                              
>      .0061291
   ln_GDP_pc |   .4441245   .1226066     3.62   0.000     .201811
> 4                                                              
>      .6864375
   EXP_ratio |  -.0045772   .0010833    -4.23   0.000    -.006718
> 2                                                              
>     -.0024362
   IMP_ratio |   .0044761   .0011349     3.94   0.000     .002233
> 1                                                              
>       .006719
     polity2 |   .0025833   .0036948     0.70   0.486    -.004718
> 9                                                              
>      .0098855
     FDI_NIF |  -.0001987   .0003112    -0.64   0.524    -.000813
> 8                                                              
>      .0004163
       _cons |   4.590507   1.214711     3.78   0.000     2.18981
> 9                                                              
>      6.991196
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    107318           1      107317     |
     ctry_id |       147         147           0    *|
        year |        14           1          13     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA12.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA12.xls
dir : seeout

. reghdfe ln_export_value tr2 tr2_soex tr2_soex_gsale soex_gsale 
> tr2_gsale gsale_lag LNTA LEV ROA GDP_g ln_GDP_pc EXP_ratio IMP_
> ratio polity2 FDI_NIF, abs(id_cs ctry_id ind2#year) cluster(ctr
> y_id) keepsing nowarn
(MWFE estimator converged in 55 iterations)

HDFE Linear regression                            Number of obs  
>  =  3,490,702
Absorbing 3 HDFE groups                           F(  15,    146)
>  =      36.08
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.3233
                                                  Adj R-squared  
>  =     0.3017
                                                  Within R-sq.   
>  =     0.0021
Number of clusters (ctry_id) =        147         Root MSE       
>  =     1.8591

                              (Std. err. adjusted for 147 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
ln_export_~e | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         tr2 |   .0552548    .024025     2.30   0.023     .007773
> 2                                                              
>      .1027364
    tr2_soex |   .2586529   .0419536     6.17   0.000     .175738
> 1                                                              
>      .3415678
tr2_soex_g~e |   .0073605   .0159523     0.46   0.645    -.024166
> 8                                                              
>      .0388877
  soex_gsale |  -.0036422   .0116652    -0.31   0.755    -.026696
> 7                                                              
>      .0194123
   tr2_gsale |   .0167539   .0088495     1.89   0.060    -.000735
> 8                                                              
>      .0342435
   gsale_lag |   .0254634   .0056379     4.52   0.000     .014320
> 9                                                              
>      .0366059
        LNTA |   .1767056   .0110856    15.94   0.000     .154796
> 7                                                              
>      .1986146
         LEV |   .0426521   .0078181     5.46   0.000     .027200
> 9                                                              
>      .0581033
         ROA |   .2580098    .017876    14.43   0.000     .222680
> 6                                                              
>       .293339
       GDP_g |   .0034127   .0014223     2.40   0.018     .000601
> 8                                                              
>      .0062236
   ln_GDP_pc |   .4340466   .1191328     3.64   0.000      .19859
> 9                                                              
>      .6694942
   EXP_ratio |  -.0044627   .0010937    -4.08   0.000    -.006624
> 3                                                              
>     -.0023012
   IMP_ratio |   .0044873   .0011253     3.99   0.000     .002263
> 4                                                              
>      .0067113
     polity2 |   .0023222   .0038502     0.60   0.547    -.005287
> 2                                                              
>      .0099317
     FDI_NIF |  -.0002071   .0003052    -0.68   0.498    -.000810
> 3                                                              
>      .0003961
       _cons |   4.792794   1.178264     4.07   0.000     2.46413
> 6                                                              
>      7.121451
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       id_cs |    107318           1      107317     |
     ctry_id |       147         147           0    *|
   ind2#year |       415           1         414     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. outreg2 using "$repfolder\result\TA12.xls", append dec(3) adjr2
>   e(r2_within)
H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\replic
> ation package [public]\\result\TA12.xls
dir : seeout

. 
. *** FA1
. use "Sample_aid_year.dta",clear

. *FA1A. number by year
. twoway bar Num year, title("Panel A")

. graph save "$repfolder\result/FA1A",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result/FA1A.gph not found)
file H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\r
> eplication package [public]\result/FA1A.gph saved

. graph export "$repfolder\result/FA1A.png",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1A.png not found)
file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1A.png saved as PNG format

. 
. *FA1B. value by year
. twoway bar Val_sum year, title("Panel B")

. graph save "$repfolder\result/FA1B",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result/FA1B.gph not found)
file H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\r
> eplication package [public]\result/FA1B.gph saved

. graph export "$repfolder\result/FA1B.png",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1B.png not found)
file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1B.png saved as PNG format

. 
. *FA1C. percentage of countries receiving aid from China
. use "Sample_ctry_year.dta",clear

. bysort year: egen tr2_mean=mean(tr2)

. bysort year: keep if _n==1
(1,970 observations deleted)

. keep year tr2_mean

. label var tr2_mean "Percent of Countries receiving Aid from Chi
> na"

. * number by year
. twoway bar tr2_mean year, title("Panel C")

. graph save "$repfolder\result/FA1C",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result/FA1C.gph not found)
file H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\r
> eplication package [public]\result/FA1C.gph saved

. graph export "$repfolder\result/FA1C.png",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1C.png not found)
file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result/FA1C.png saved as PNG format

. 
. *** FA2
. ** FA2A
. use "Sample_ctry_year.dta",clear

. drop if Income_Indicator_2000=="H"
(425 observations deleted)

. g _tintra=year-tr2_year
(317 missing values generated)

. 
. replace _tintra = -4 if _tintra <=-4
(39 real changes made)

. replace _tintra =  4 if _tintra >= 4
(1,023 real changes made)

. replace _tintra =. if _tintra==.
(0 real changes made)

. 
. tab _tintra, missing 

    _tintra |      Freq.     Percent        Cum.
------------+-----------------------------------
         -4 |         57        3.65        3.65
         -3 |         24        1.54        5.19
         -2 |         32        2.05        7.24
         -1 |         51        3.27       10.51
          0 |         72        4.62       15.13
          1 |         72        4.62       19.74
          2 |         71        4.55       24.29
          3 |         75        4.81       29.10
          4 |      1,106       70.90      100.00
------------+-----------------------------------
      Total |      1,560      100.00

. generate dx_4  = 0

. replace dx_4  = 1 if _tintra == -4
(57 real changes made)

. generate dx_3  = 0

. replace dx_3  = 1 if _tintra == -3
(24 real changes made)

. generate dx_2  = 0

. replace dx_2  = 1 if _tintra == -2
(32 real changes made)

. generate dx_1  = 0

. replace dx_1  = 1 if _tintra == -1
(51 real changes made)

. 
. generate dx0  = 0

. replace dx0 = 1 if _tintra == 0
(72 real changes made)

. 
. generate dx1  = 0

. replace dx1  = 1 if _tintra == 1
(72 real changes made)

. generate dx2  = 0

. replace dx2  = 1 if _tintra == 2
(71 real changes made)

. generate dx3  = 0

. replace dx3  = 1 if _tintra == 3
(75 real changes made)

. generate dx4  = 0

. replace dx4  = 1 if _tintra == 4
(1,106 real changes made)

.  
. g d_4=dx_4

. g d_3=dx_3

. g d_2=dx_2

. g d_1=dx_1

. g d1=dx1

. g d2=dx2

. g d3=dx3

. g d4=dx4

. 
. label var d_4 "-4"

. label var d_3 "-3"

. label var d_2 "-2"

. label var d_1 "-1"

. label var d1 "1"

. label var d2 "2"

. label var d3 "3"

. label var d4 "4"

. 
. reghdfe ln_export d_4 d_3 d_2 d_1 d1 d2 d3 d4 GDP_g ln_GDP_pc E
> XP_ratio IMP_ratio polity2 FDI_NIF,  abs(ctry_id year) cluster(
> ctry_id) keepsing nowarn
(MWFE estimator converged in 5 iterations)

HDFE Linear regression                            Number of obs  
>  =      1,560
Absorbing 2 HDFE groups                           F(  14,    117)
>  =       6.77
Statistics robust to heteroskedasticity           Prob > F       
>  =     0.0000
                                                  R-squared      
>  =     0.9754
                                                  Adj R-squared  
>  =     0.9728
                                                  Within R-sq.   
>  =     0.1822
Number of clusters (ctry_id) =        118         Root MSE       
>  =     0.3638

                              (Std. err. adjusted for 118 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         d_4 |  -.1750801   .1290315    -1.36   0.177    -.430620
> 2                                                              
>        .08046
         d_3 |  -.1251324   .1122379    -1.11   0.267    -.347413
> 6                                                              
>      .0971488
         d_2 |  -.0007433   .0851841    -0.01   0.993     -.16944
> 6                                                              
>      .1679594
         d_1 |  -.1098783   .0930115    -1.18   0.240    -.294082
> 7                                                              
>      .0743262
          d1 |   .1261398   .0500626     2.52   0.013     .026993
> 4                                                              
>      .2252861
          d2 |   .2112779   .0551261     3.83   0.000     .102103
> 5                                                              
>      .3204523
          d3 |   .2289843   .0666657     3.43   0.001     .096956
> 4                                                              
>      .3610122
          d4 |   .3159877   .0839112     3.77   0.000     .149805
> 9                                                              
>      .4821694
       GDP_g |   .0025198   .0031773     0.79   0.429    -.003772
> 7                                                              
>      .0088123
   ln_GDP_pc |   1.248816   .2882811     4.33   0.000     .677890
> 4                                                              
>      1.819742
   EXP_ratio |  -.0010619   .0031981    -0.33   0.740    -.007395
> 6                                                              
>      .0052719
   IMP_ratio |   .0075544   .0020032     3.77   0.000     .003587
> 3                                                              
>      .0115216
     polity2 |   .0160568   .0109772     1.46   0.146    -.005682
> 9                                                              
>      .0377966
     FDI_NIF |   .0131355   .0034594     3.80   0.000     .006284
> 3                                                              
>      .0199867
       _cons |    9.38089   2.314417     4.05   0.000     4.79730
> 8                                                              
>      13.96447
-----------------------------------------------------------------
> -------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     ctry_id |       118         118           0    *|
        year |        15           1          14     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF comput
> ation

. coefplot , vertical keep (d_4 d_3 d_2 d_1 d1 d2 d3 d4) yline(0)
>   title("Ln(Export Value)")

. 
. graph save "$repfolder\result\FA2A.gph", replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\FA2A.gph not found)
file H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\r
> eplication package [public]\result\FA2A.gph saved

. graph export "$repfolder\result\FA2A.png",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result\FA2A.png not found)
file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result\FA2A.png saved as PNG format

. 
. ** FA2B. New DiD method (Sun and Abraham 2020)
. 
. use "Sample_ctry_year.dta",clear

. drop if Income_Indicator_2000=="H"
(425 observations deleted)

. 
. g _tintra=year-tr2_year
(317 missing values generated)

. 
. replace _tintra = -4 if _tintra <=-4
(39 real changes made)

. replace _tintra =  4 if _tintra >= 4
(1,023 real changes made)

. replace _tintra =. if _tintra==.
(0 real changes made)

. 
. tab _tintra, missing 

    _tintra |      Freq.     Percent        Cum.
------------+-----------------------------------
         -4 |         57        3.65        3.65
         -3 |         24        1.54        5.19
         -2 |         32        2.05        7.24
         -1 |         51        3.27       10.51
          0 |         72        4.62       15.13
          1 |         72        4.62       19.74
          2 |         71        4.55       24.29
          3 |         75        4.81       29.10
          4 |      1,106       70.90      100.00
------------+-----------------------------------
      Total |      1,560      100.00

. generate dx_4  = 0

. replace dx_4  = 1 if _tintra == -4
(57 real changes made)

. generate dx_3  = 0

. replace dx_3  = 1 if _tintra == -3
(24 real changes made)

. generate dx_2  = 0

. replace dx_2  = 1 if _tintra == -2
(32 real changes made)

. generate dx_1  = 0

. replace dx_1  = 1 if _tintra == -1
(51 real changes made)

. 
. generate dx0  = 0

. replace dx0 = 1 if _tintra == 0
(72 real changes made)

. 
. generate dx1  = 0

. replace dx1  = 1 if _tintra == 1
(72 real changes made)

. generate dx2  = 0

. replace dx2  = 1 if _tintra == 2
(71 real changes made)

. generate dx3  = 0

. replace dx3  = 1 if _tintra == 3
(75 real changes made)

. generate dx4  = 0

. replace dx4  = 1 if _tintra == 4
(1,106 real changes made)

.  
. g d_4=dx_4

. g d_3=dx_3

. g d_2=dx_2

. g d_1=dx_1

. g d1=dx1

. g d2=dx2

. g d3=dx3

. g d4=dx4

. 
. label var d_4 "-4"

. label var d_3 "-3"

. label var d_2 "-2"

. label var d_1 "-1"

. label var d1 "1"

. label var d2 "2"

. label var d3 "3"

. label var d4 "4"

. 
. g never_treat=(mi(tr2_year))

. egen maxyear=max(tr2_year)

. g last=(year==maxyear)

. replace last=1 if never_treat==1
(295 real changes made)

. eventstudyinteract ln_export d_4 d_3 d_2 d_1 d1 d2 d3 d4, covar
> iates(GDP_g ln_GDP_pc EXP_ratio IMP_ratio polity2 FDI_NIF) coho
> rt(tr2_year) control_cohort(never_treat) absorb(ctry_id year) v
> ce(cluster ctry_id) 
(obs=1,243)

IW estimates for dynamic effects                        Number of
>  obs                                                           
>      =  1,558
Absorbing 2 HDFE groups                                 F(84, 115
> )                                                              
>      =      .
                                                        Prob > F 
>                                                                
>      =      .
                                                        R-squared
>                                                                
>      = 0.9765
                                                        Adj R-squ
> ared                                                           
>      = 0.9727
                                                        Root MSE 
>                                                                
>      = 0.3638
                              (Std. err. adjusted for 116 cluster
> s in ctry_id)
-----------------------------------------------------------------
> -------------
             |               Robust
   ln_export | Coefficient  std. err.      t    P>|t|     [95% co
> n                                                              
>  f. interval]
-------------+---------------------------------------------------
> -------------
         d_4 |  -.2136193   .1421692    -1.50   0.136    -.495229
> 2                                                              
>      .0679906
         d_3 |  -.0835995   .1200903    -0.70   0.488    -.321475
> 3                                                              
>      .1542763
         d_2 |  -.0106789   .0807582    -0.13   0.895    -.170645
> 3                                                              
>      .1492875
         d_1 |  -.0820046   .0858998    -0.95   0.342    -.252155
> 6                                                              
>      .0881464
          d1 |   .1142106   .0485972     2.35   0.020     .017948
> 9                                                              
>      .2104723
          d2 |   .1915655   .0607087     3.16   0.002     .071313
> 2                                                              
>      .3118178
          d3 |   .2085144   .0779613     2.67   0.009      .05408
> 8                                                              
>      .3629408
          d4 |   .2979319   .1190206     2.50   0.014     .062174
> 9                                                              
>      .5336889
-----------------------------------------------------------------
> -------------

. 
. matrix C = e(b_iw)

. mata st_matrix("A",sqrt(diagonal(st_matrix("e(V_iw)"))))

. matrix C = C \ A'

. matrix list C

C[2,8]
           d_4         d_3         d_2         d_1          d1
r1  -.21361927  -.08359949   -.0106789   -.0820046   .11421062
c1   .14216924    .1200903   .08075818   .08589983   .04859721

            d2          d3          d4
r1   .19156551   .20851439   .29793188
c1   .06070871   .07796133   .11902064

. coefplot matrix(C[1]), vertical se(C[2]) yline(0)  title("ln(Ex
> port Value), SA Method")

. graph save "$repfolder\result\FA2B.gph", replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\result\FA2B.gph not found)
file H:\Research Project 3\Dong-Sibo\Aid_Trade\replication\code\r
> eplication package [public]\result\FA2B.gph saved

. graph export "$repfolder\result\FA2B.png",replace
(file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result\FA2B.png not found)
file H:\Research Project
    3\Dong-Sibo\Aid_Trade\replication\code\replication package
    [public]\\result\FA2B.png saved as PNG format

. 
. log close
      name:  <unnamed>
       log:  H:\Research Project 3\Dong-Sibo\Aid_Trade\replicatio
> n\code\replication package [public]\\result\log_file_online.log
  log type:  text
 closed on:  24 Feb 2025, 14:55:15
-----------------------------------------------------------------
